<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<form th:action="@{/student/checkCourse}" th:object="${student}" method="post" th:align="center">
<h1 th:align="right">用户名:<span th:text="${username}"></span></h1>
<h1>请输入你的信息！</h1>
    <div th:if="${#fields.hasErrors()}">
        <span class="validationError" style="color: red">
            请更正错误再次提交！
        </span>
    </div>
    <br>
    <label>姓名:</label>
    <input  type="text" th:field="*{name}" />
    <span class="validationError" style="color: red"
          th:if="${#fields.hasErrors('name')}"
          th:errors="*{name}">Name Error</span>
    <br/>
    <label>学号:</label>
    <input  type="text" th:field="*{studentId}" />
    <span class="validationError" style="color: red"
          th:if="${#fields.hasErrors('studentId')}"
          th:errors="*{studentId}">Id Error</span>
    <br/>
    <label>年级:</label>
    <input  type="text" th:field="*{grade}" />
    <span class="validationError" style="color: red"
          th:if="${#fields.hasErrors('grade')}"
          th:errors="*{grade}">Grade Error</span>
    <br/>
    <label>专业:</label>
    <input  type="text" th:field="*{department}" />
    <span class="validationError" style="color: red"
          th:if="${#fields.hasErrors('department')}"
          th:errors="*{department}">Department Error</span>
    <br/>
    <label>学院:</label>
    <input  type="text" th:field="*{academy}" />
    <span class="validationError" style="color: red"
          th:if="${#fields.hasErrors('academy')}"
          th:errors="*{academy}">Academy Error</span>
    <br/>
    <br/>

    <input type="submit" value="提交信息">
</form>
</body>
</html>